package com.slz3.business.module.afterSaleManagement.aftApplyOrderLine.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.afterSaleManagement.aftApplyOrderLine.domain.AftApplyOrderLine;
import com.slz3.business.module.afterSaleManagement.aftApplyOrderLine.domain.AftApplyOrderLineCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class AftApplyOrderLineResAtomic extends AftApplyOrderLineResExecutor {

    public Mono<ServerResponse> add_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLine aftApplyOrderLine) {
        return AftApplyOrderLineResSafeValid.add(req, aftApplyOrderLine) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, aftApplyOrderLine);
    }

    public Mono<ServerResponse> delete_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLineCondition aftApplyOrderLineCondition) {
        return AftApplyOrderLineResSafeValid.delete(req, aftApplyOrderLineCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLine aftApplyOrderLine) {
        return AftApplyOrderLineResSafeValid.modify(req, aftApplyOrderLine) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, aftApplyOrderLine);
    }

    public Mono<ServerResponse> info_$AftApplyOrderLineUpdateLock(ServerRequest req) {
        return AftApplyOrderLineResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLineCondition aftApplyOrderLineCondition) {
        return AftApplyOrderLineResSafeValid.auditSubmit(req, aftApplyOrderLineCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLineCondition aftApplyOrderLineCondition) {
        return AftApplyOrderLineResSafeValid.audit(req, aftApplyOrderLineCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLineCondition aftApplyOrderLineCondition) {
        return AftApplyOrderLineResSafeValid.auditReject(req, aftApplyOrderLineCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLineCondition aftApplyOrderLineCondition) {
        return AftApplyOrderLineResSafeValid.usingEnable(req, aftApplyOrderLineCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$AftApplyOrderLineUpdateLock(ServerRequest req, AftApplyOrderLineCondition aftApplyOrderLineCondition) {
        return AftApplyOrderLineResSafeValid.usingDisable(req, aftApplyOrderLineCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
